package com.itheima_16;

import java.io.*;

public class CopyJavaDemo {
    public static void main(String[] args) throws IOException {
        // 创建字符缓存输入流对象
        BufferedReader br = new BufferedReader(new FileReader("/Users/oscar/Desktop/HQWork/学习资料/code/mySimpleDateFormat/src/com/itheima_16/CopyFileDemo.java"));
        // 创建字符缓存输出流对象
        BufferedWriter bw = new BufferedWriter(new FileWriter("/Users/oscar/Desktop/HQWork/学习资料/code/mySimpleDateFormat/CopyFile.java"));

        // 写入，复制文件
        String line;
        while ((line = br.readLine()) != null) {
            bw.write(line);
            bw.newLine();
            bw.flush();
        }

        // 释放资源
        br.close();
        bw.close();
    }
}
